<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    function greet() {
      console.log('Hello everybody!');
    }

    function maxNum(a, b) {
      a = parseInt(a);
      b = parseInt(b);
      return a >= b ? a : b;
    }

    function greet(name, say = 'Hi, I\'m ') {
      console.log(say + name);
    }
    greet('Li Ming');

    function transferParam(num1, ...theNums) {
      console.log(theNums);     // 在控制台输出用户调用函数时传递的参数
    }
    transferParam(0, 1, 2, 3, 4);

    // function transferParam(...theNums) {
    //   console.log(theNums);     // 在控制台输出用户调用函数时传递的参数
    // }
    // transferParam(1, 2, 3, 4);
  </script>
</body>
</html>